<?php

use yii\helpers\Html;
use yii\widgets\ActiveForm;

/* @var $this yii\web\View */
/* @var $model app\models\WorkAccount */
/* @var $form yii\widgets\ActiveForm */
?>

<div class="work-account-form">

    <?php $form = ActiveForm::begin(); ?>
	<?php
	if($model->isNewRecord && $model->acc_pro_id == null)
	{
			//chọn người dùng cần tạo tài khoản làm việc
	?>
				<?=
				$form->field($model, 'acc_pro_id')->dropDownList($arrayAccProject); 
					?>
	<?php
	}
	else
	{
	?>
    <?= $form->field($model, 'acc_pro_id')->hiddenInput()->label(false); ?>
	<?php
	}
	?>

    <?= $form->field($model, 'work_acc')->textInput(['maxlength' => 25]) ?>

    <?= $form->field($model, 'work_pass')->textInput(['maxlength' => 25]) ?>

    <!--<?= $form->field($model, 'ban')->textInput() ?>-->
	

    <div class="form-group">
        <?= Html::submitButton($model->isNewRecord ? 'Create' : 'Update', ['class' => $model->isNewRecord ? 'btn btn-success' : 'btn btn-primary']) ?>
    </div>

    <?php ActiveForm::end(); ?>

</div>
